package com.shop.rabbit.business;

import cn.model.Balance;
import com.shop.rabbit.mapper.BalanceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class WallerBusiness {
    @Autowired
    private BalanceMapper balanceMapper;
    public void execute(String message) {
        String[] coin_list = {"BTC","ETH","USDT","LTC"};
        for (String coin : coin_list) {
            Balance balance =  new Balance();
            balance.setUserId(message);
            balance.setCurrency(coin);
            balanceMapper.insert(balance);
        }
        System.out.println("WallerBusiness"+message);
    }
}
